# Copyright 2021 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob")
load("//build_tools/bazel:iree_lit_test.bzl", "iree_lit_test_suite")

package(
    features = ["layering_check"],
    licenses = ["notice"],  # Apache 2.0
)

iree_lit_test_suite(
    name = "lit",
    srcs = enforce_glob(
        [
            "apply_pdl_patterns_tosa.mlir",
            "auto_input_conversion.mlir",
            "convert_i48_to_i64.mlir",
            "strip_signedness.mlir",
            "tosa_to_linalg_ext.mlir",
            "verify_compiler_tosa_input_legality.mlir",
        ],
        include = ["*.mlir"],
        exclude = [
            "tosa.pdl.mlir",
        ],
    ),
    cfg = "//compiler:lit.cfg.py",
    data = [
        "tosa.pdl.mlir",
    ],
    tools = [
        "//tools:iree-compile",
        "//tools:iree-opt",
        "@llvm-project//llvm:FileCheck",
    ],
)
